package com.forum.community.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.forum.community.entity.ForumAnnouncement;
import com.forum.community.mapper.ForumAnnouncementMapper;
import com.forum.community.service.ForumAnnouncementService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bncgnc
 * @since 2022-01-04
 */
@Service
public class ForumAnnouncementServiceImpl extends ServiceImpl<ForumAnnouncementMapper, ForumAnnouncement> implements ForumAnnouncementService {

    @Override
    public List<ForumAnnouncement> getAnnocement(Long communityId) {
        QueryWrapper<ForumAnnouncement> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("community_id",communityId);
        List<ForumAnnouncement> list = baseMapper.selectList(queryWrapper);
        return list;

    }
}
